#include "stdafx.h"
#include <afxdllx.h>

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

TG_IMPLEMENT_EXTENSION_MODULE(TGRxKernelDLL);

extern "C" int APIENTRY
DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
	// Remove this if you use lpReserved
	UNREFERENCED_PARAMETER(lpReserved);

	if (dwReason == DLL_PROCESS_ATTACH)
	{
		TRACE0("TGRxKernel.DLL Initializing!\n");
		
		TGRxKernelDLL.AttachInstance(hInstance);
	}
	else if (dwReason == DLL_PROCESS_DETACH)
	{
		TRACE0("TGRxKernel.DLL Terminating!\n");

		TGRxKernelDLL.DetachInstance();
	}
	return 1;
}
